home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re CW9, RTTI, and ODF.6 < prev    next >
Encoding:
Internet Message Format  |  1996-08-12  |  1.8 KB  |  [TEXT/ttxt]

  1. Subject:     Re: CW9, RTTI, and ODF
  2. Sent:        8/12/96 12:00 PM
  3. Received:    8/12/96 12:01 PM
  4. From:        Kirk Swenson, kswenson@keypress.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Matthew Clay wrote:
  9. >>
  10. >> Is that not what a pure virtual member function is all about? The problem
  11. >> here was that the compiler didn't inform the original poster which pure
  12. >> virtual(s) were undefined. Most compilers don't, but there isn't anything
  13. >> preventing them from doing so.
  14. >
  15. >Pure virtual functions are functions that are declared in an abstract base
  16. >class that must be overriden by a subclass. They can optionally be
  17. >implemented in the class in which they are declared pure virtual. Kirk is
  18. >suggesting the addition of the ability to explicitly mark an override of a
  19. >virtual method in the class that overrides the method. He is suggesting
  20. >that a compile-time error be generated when the compiler sees a method
  21. >marked override when there is no virtual method with the same signature in
  22. >a base class.
  23. >
  24. >gsf.
  25.  
  26. Thanks, Greg.  I was in the process of formulating a weaker statement of
  27. this sort when your message arrived, saving me the trouble.  I will only
  28. add that pure virtuals can only catch a subset of the cases that an
  29. override keyword could, because many method overrides are not overrides of
  30. pure virtuals.  Also, the benefit of receiving the error message at the
  31. time the class declaration is processed, rather than when another piece of
  32. code that tries to create the incomplete class is compiled should not be
  33. overlooked.
  34.  
  35. Since this isn't really germane to ODF, I suggest that we take this offline
  36. if further discussion is warranted.
  37.  
  38. Kirk Swenson
  39. Senior Software Engineer
  40. Key Curriculum Press
  41. kswenson@keypress.com
  42.  
  43.  
  44.